{layout name="public/layout" /}
        {include file='yxnavbar'}
<link href="/resource/components/ueditors/themes/default/css/ueditor.css" type="text/css" rel="stylesheet">

<script type="text/javascript" charset="utf-8"  src="/resource/components/ueditors/ueditor.config.js?v=1"></script>
<script type="text/javascript" charset="utf-8" src="/resource/components/ueditors/ueditor.all.min.js?v=1"></script>
<script type="text/javascript" src="/resource/components/ueditors/lang/zh-cn/zh-cn.js"></script>
<script>
    var ueditorObj = {}
</script>
<div class="main">
    <ul class="nav nav-tabs">
        <li ><a href="{php echo createWebUrl('shangjia',array('themeid'=>$themeid));}">商家列表</a></li>
        {if $system['softstyle']==109}
        <li {if $action == 11}class="active"{/if}><a href="{php echo createWebUrlPlugin('education.info',array('themeid'=>$themeid,'action'=>11));}">新合伙人</a></li>
        {else}
        <li {if $action == 3}class="active"{/if}><a href="{php echo createWebUrl('shangjia', array('action' =>3,'themeid'=>$themeid));}">新合伙人</a></li>
        {/if}
        {if $shangjia['id'] == 0}
        <li class="active"><a href="{php echo createWebUrl('shangjiaadd',array('themeid'=>$themeid));}">新增商家</a></li>
        {else}
<!--        <li ><a href="{php echo createWebUrl('shangjiaadd',array('themeid'=>$themeid));}">新增商家</a></li>-->
        <li class="active"><a href="">编辑商家</a></li>
        {/if}
        {if $system['softstyle']==109}
        {if  $open_shangjia_rules}
        <li {if $action == 71}class="active"{/if}><a href="{php echo createWebUrlPlugin('education.category',array('themeid'=>$themeid,'action'=>71));}">分类管理</a></li>
        {/if}
        {/if}
    </ul>
</div>       
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
.add_input{margin-bottom:10px;}
.mini_btn{
    padding: 2px 4px 2px 4px;border: 1px solid black;border-radius: 8px; margin-right: 10px
}
.add_input.wraning{
    border-color: red;
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px red;
    -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px red;
}
</style>
<form class="form-horizontal form" action="" method="post" enctype="multipart/form-data">
    <div class="clearfix">
        <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
              <div class="nav_tab nav_0">
                 <div class="panel panel-default">
                    <div class="panel-heading">基本信息</div>
                    <div class="panel-body">
                            <input type="hidden" name="shangjiaid" value="{$shangjia['id']}">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">商家排序</label>
                                <div class="col-sm-8 col-xs-12">
                                    <input type="text" class="form-control"  placeholder="" name="displayorder"  value="{$shangjia['displayorder']}">
                                </div>
                            </div>
                            {if !empty($grouplist) }
                             <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">商家分组</label>
                                <div class="col-sm-8 col-xs-12">
                                    <select class="form-control" name="groupid">
                                    {loop $grouplist $row}
                                        <option value="{$row['id']}" {if $shangjia['groupid'] == $row['id'] }selected="selected"{/if}>{$row['name']}</option>
                                    {/loop}
                                     </select>
                                </div>
                            </div>
                            {/if}
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style="color: red;">*</span>商家简称</label>
                                <div class="col-sm-8 col-xs-12">
                                    <input type="text" class="form-control"  placeholder="" name="name"  value="{$shangjia['name']}"  {if $is_forbid_edit}readonly{/if}>
                                   <span class="help-block">尽量用简称:客户核销界面,员工排行界面等处会有显示</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">{if $system['softstyle']!=106}<span style="color: red;">*</span>{/if}首页图片</label>
                                <div class="col-sm-8 col-xs-12">
                                   {php echo view_form_field_image('imgs',$shangjia['imgs']);}
                                   <span class="help-block">在活动首页显示,如果下方[商家活动详情]不为空,点击首页此图,会显示其内容</span>
                                </div>
                            </div>
                            {if $system['softstyle']>0}
            <!--                <div class="form-group">-->
            <!--                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">{if $system['softstyle']==106}<span style="color: red;">*</span>{/if}电话</label>-->
            <!--                    <div class="col-sm-8 col-xs-12">-->
            <!--                        <input type="text" class="form-control"  placeholder="" name="mobile"  value="{$shangjia['mobile']}" {if $is_forbid_edit}readonly{/if}>-->
            <!--                    </div>-->
            <!--                </div> -->
            <!--                <div class="form-group">-->
            <!--                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">电话2</label>-->
            <!--                    <div class="col-sm-8 col-xs-12">-->
            <!--                        <input type="text" class="form-control"  placeholder="" name="mobile1"  value="{$shangjia['mobile1']}" {if $is_forbid_edit}readonly{/if}>-->
            <!--                    </div>-->
            <!--                </div>-->
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">{if $system['softstyle']==106}<span style="color: red;">*</span>{/if}地址</label>
                                <div class="col-sm-8 col-xs-12" style="padding-bottom: 30px;">
                                    {loop $shangjia['address'] $key $row}
                                    <div style="display: flex;flex-direction:row; " class="school-item">
                                        <input  type="text" class="form-control add_input" style="width: 40%"  placeholder="请输入地址名称" name="address[]" maxlength="30" value="{$row}">
                                        <span class="input-group-addon" style="width: 80px;height: 34px;line-height: 20px">定位</span>
                                        <input type="text" class="form-control add_input" style="width: 24%"  placeholder="粘贴定位" name="mappoint[]" maxlength="30" value="{$shangjia['mappoint'][$key]}">
                                        <span class="input-group-addon" style="width: 80px;height: 34px;line-height: 20px">电话</span>
                                        <input type="text" class="form-control add_input" style="width: 20%"  placeholder="输入电话" name="new_mobile[]" maxlength="12" value="{$shangjia['new_mobile'][$key]}">
                                        <a onclick="deleteSchoolAddress(this)" class="mini_btn" style="height: 34px;width: 50px;text-align: center;line-height: 26px">删除</a>
                                    </div>
                                    {/loop}
                                    <span class="help-block school-span">此值为空不显示导航 如：36.074077,120.395737<a style="color: #ff0000" href="https://lbs.qq.com/tool/getpoint/index.html" target="_blank">点击打开坐标拾取器</a>，搜索地址后，复制当前坐标</span>
                                    <div style="clear: both;margin-top: 12px;" class="add-school">
                                        <a onclick="addSchoolAddress()" class="mini_btn">新增校区</a>
                                    </div>
                                </div>
                            </div>
                            {/if}

            <!--            多价格支持-->
                            {if $system['bottom_jiage']>=1}
                            <div class="form-group">
                                <label class="col-sm-2 col-xs-12 control-label">参与价格</label>
                                <div class="col-sm-10 col-xs-12">
                                    {loop $group_price_arr $row}
                                    <label class="radio-inline">
                                        <input name="join_group_price[]" type="checkbox" value="{$row['key']}"{if $row['join']}checked{/if}> {$row['title']}
                                    </label>
                                    {/loop}
                                </div>
                            </div>
                            {/if}

                            {if ($system['softstyle']==108 && $system['beilai_style']==1) || $system['softstyle']==109}
                                    {if $open_shangjia_rules==1 && ($system['softstyle']==108 || ($system['softstyle']==109 && $setting['course_style']==3))}
                                        <div class="form-group">
                                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style="color: red;">*</span>所属商家分类</label>
                                            <div class="col-sm-8 col-xs-12">
                                                <select class="form-control" name="shangjia_rule_id">
                                                    <option value="0" {if empty($shangjia['shangjia_rule_id']) }selected="selected"{/if}>----------请选择商家分类--------</option>
                                                    {loop $shangjia_category  $val}
                                                    <option value="{$val['ct_id']}" {if $shangjia['shangjia_rule_id'] == $val['ct_id'] }selected="selected"{/if}>{$val['ct_id']}-{$val['ct_name']}</option>
                                                    {/loop}
                                                </select>
                                            </div>
                                        </div>
                                    {/if}
                                    {if ($system['softstyle']==108 && $course_mode ==1) || ($system['softstyle']==109 && $setting['course_style']==3)}
                                        <div class="form-group">
                                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style="color: red;">*</span>商家可选课程数</label>
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="input-group">
                                                    <span class="input-group-addon">最少选择</span>
                                                    <input  type="number" min=0 step=1 class="form-control"  placeholder="必须为大于0" name="course_min"  value="{$course_min}">
                                                    <span class="input-group-addon">个;最多选择</span>
                                                    <input type="number" class="form-control" min=1 step=1  placeholder="必须为大于0" name="course_max"  value="{$course_max}">
                                                    <span class="input-group-addon">个;</span>
                                                </div>
                                            </div>
                                        </div>
                                    {/if}
                            {/if}

            <!--            教培增加-->
                            {if $system['softstyle']==109}
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">教培-商家课程选项卡图</label>
                                    <div class="col-sm-4 col-xs-12">
                                        {php echo view_form_field_image('card_img',$shangjia['card_img']);}
                                        <span class="help-block">尺寸:1360*680像素</span>
                                    </div>
                                </div>
                            {/if}
            <!--            教培增加-->
            <!--                <div class="form-group">-->
            <!--                    <label class="col-sm-2 col-xs-12 control-label">店铺导航坐标</label>-->
            <!--                    <div class="col-sm-8 col-xs-12">-->
            <!--                        <input type="text" class="form-control"  placeholder="" name="mappoint"  value="{$shangjia['mappoint']}">-->
            <!--                        <span class="help-block">此值为空不显示导航 如：36.074077,120.395737<a style="color: #ff0000" href="https://lbs.qq.com/tool/getpoint/index.html" target="_blank">点击打开坐标拾取器</a>，搜索地址后，复制当前坐标</span>-->
            <!--                    </div>-->
            <!--                </div>-->

                            <div class="form-group">
                                <label class="col-sm-2 col-xs-12 control-label">商家视频</label>
                                <div class="col-sm-8 col-xs-12">
                                    {php echo view_form_field_video('videoyouku',$shangjia['videoyouku']);}
                                    <span class="help-block">{if $isold==true && !$_G['isSuperAdmin']}已禁用，{/if}精简视频，控制在90秒内为最佳，图文内容还可以放其它视频</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">商家视频背景</label>
                                <div class="col-sm-4 col-xs-12">
                                    {php echo view_form_field_image('video_back_img',$shangjia['video_back_img']);}
                                    <span class="help-block">尺寸:375*230像素;{if $isold==true && !$_G['isSuperAdmin']}已禁用，{/if}</span>
                                </div>
                            </div>

                           <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">LOGO图片</label>
                                {if $config['iconlogo']==1}
                                <div class="col-sm-4 col-xs-12">
                                    {php echo view_form_field_image('darkicon',$shangjia['darkicon']);}
                                    <span class="help-block">未点亮：尺寸:200*200像素</span>
                                </div>
                                {else}
                                <input type="hidden" name="darkicon" value="{$shangjia['darkicon']}" />
                                {/if}
                                <div class="col-sm-4 col-xs-12">
                                    {php echo view_form_field_image('logo',$shangjia['logo']);}
                                    <span class="help-block">{if $config['iconlogo']==1}点亮图：{/if}尺寸:200*200像素</span>
                                </div>
                            </div>
                           <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">{if $system['softstyle']==106}<span style="color: red;">*</span>{/if}商家详情顶图</label>
                                <div class="col-sm-8 col-xs-12">
                                   {php echo view_form_field_multi_image('topimgs',$topimgs);}
                                   <span class="help-block">一般为活动内容,店内照片,客户见证等</span>
                                </div>
                            </div>
                           <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">{if $system['softstyle']==106}<span style="color: red;">*</span>{/if}商家活动详情</label>
                                <div class="col-sm-8 col-xs-12">
                                   {php echo view_ueditor('content', $shangjia['content']);}
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">首页跳转网址</label>
                                <div class="col-sm-8 col-xs-12">
                                    <input type="text" class="form-control"  placeholder="" name="url"  value="{$shangjia['url']}">
                                    <span class="help-block">如：跳转第三方平台，直接输入网址即可</span>
                                </div>
                            </div>

                            {if $_G['isSuperAdmin']}
                             <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">团队导入</label>
                                <div class="col-sm-8 col-xs-12">
                                    <a class="btn btn-default" href="{php echo createWebUrl('shangjiaadd', array('op'=>'tdrenling','id' =>$shangjia['id']));}">团队导入该公司</a>
                                    <a class="btn btn-default" href="{php echo createWebUrl('shangjiaadd', array('op'=>'grrenling','id' =>$shangjia['id']));}">员工导入该公司</a>
                                    <span class="help-block">普通软件升级为异业软件时，团队或员工已注册，可在此处快速导入在此公司名下，无需逐一扫码，也可以在员工业绩中逐一修改。</span>
                                </div>
                             </div>
                            {/if}
                    </div>
                 </div>
                  {if $system['softstyle']==106}
                  <div class="panel panel-default">
                        <div class="panel-heading">{if $system['softstyle']==106}<span style="color: red;">*</span>{/if}前端显示的文本</div>
                        <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">卡券1说明</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" class="form-control"  placeholder="" name="text1"  value="{$shangjia['text1']}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">卡券2说明</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" class="form-control"  placeholder="" name="text2"  value="{$shangjia['text2']}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">待领取1说明</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" class="form-control"  placeholder="" name="text3"  value="{$shangjia['text3']}">
                                       <span class="help-block">如果为空，则与卡券1说明相同,<em>文本</em>可突出显示</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">待领取2说明</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" class="form-control"  placeholder="" name="text4"  value="{$shangjia['text4']}">
                                       <span class="help-block">如果为空，则与卡券2说明相同,<em>文本</em>可突出显示</span>
                                    </div>
                                </div>
                        </div>
                  </div>
                  {/if}
                  {if $shangjiaid>0 }
                  <div class="panel panel-default">
                        <div class="panel-heading">虚拟数据</div>
                        <div class="panel-body">
                                <input type="hidden" name="shangjiaid" value="{$shangjia['id']}">

                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>新粉丝</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon">今日实际</span>
                                            <input class="form-control" placeholder="0" name="newfans" value="{$today['newfans']}" disabled type="text">
                                            <span class="input-group-addon">+</span>
                                            <span class="input-group-addon"><span style="color: red;">今日虚拟</span></span>
                                            <input class="form-control" placeholder="0" name="newfansxuni" value="{$xuni['newfans']}" type="text">
                                            <span class="input-group-addon">=</span>
                                            <span class="input-group-addon">今日累计</span>
                                            <input class="form-control" placeholder="0" name="newfans" value="{php echo $today['newfans'] + $xuni['newfans'];}" disabled type="text">
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>转发量</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon">今日实际</span>
                                            <input class="form-control" placeholder="0" name="forward" value="{$today['forward']}" disabled type="text">
                                            <span class="input-group-addon">+</span>
                                            <span class="input-group-addon"><span style="color: red;">今日虚拟</span></span>
                                            <input class="form-control" placeholder="0" name="forwardxuni" value="{$xuni['forward']}" type="text">
                                            <span class="input-group-addon">=</span>
                                            <span class="input-group-addon">今日累计</span>
                                            <input class="form-control" placeholder="0" name="forward" value="{php echo $today['forward'] + $xuni['forward'];}" disabled type="text">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>浏览量</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon">今日实际</span>
                                            <input class="form-control" placeholder="0" name="scansum" value="{$today['scansum']}" disabled type="text">
                                            <span class="input-group-addon">+</span>
                                            <span class="input-group-addon"><span style="color: red;">今日虚拟</span></span>
                                            <input class="form-control" placeholder="0" name="scansumxuni" value="{$xuni['scansum']}" type="text">
                                            <span class="input-group-addon">=</span>
                                            <span class="input-group-addon">今日累计</span>
                                            <input class="form-control" placeholder="0" name="scansum" value="{php echo $today['scansum'] + $xuni['scansum'];}" disabled type="text">
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="require">*</span>成交量</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon">今日实际</span>
                                            <input class="form-control" placeholder="0" name="record" value="{$today['record']}" disabled type="text">
                                            <span class="input-group-addon">+</span>
                                            <span class="input-group-addon"><span style="color: red;">今日虚拟</span></span>
                                            <input class="form-control" placeholder="0" name="recordxuni" value="{$xuni['record']}" type="text">
                                            <span class="input-group-addon">=</span>
                                            <span class="input-group-addon">今日累计</span>
                                            <input class="form-control" placeholder="0" name="record" value="{php echo $today['record'] + $xuni['record'];}" disabled type="text">
                                        </div>
                                        <span class="help-block">今日虚拟：只修改今天的成交数据，并永久保存在今天日报中，明日如需再加虚拟数是从0开始加；注：以上4个值为0不保存；</span>
                                    </div>
                                </div>
                                {if $config['shopsort']==1}
                                <div class="form-group">
                                     <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">虚拟选择</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <div class="input-group">
                                            <input type="text" class="form-control"  placeholder="" name="xuanze_xn"  value="{$shangjia['xuanze_xn']}">
                                            <span class="input-group-addon">次</span>
                                        </div>
                                    </div>
                                </div>
                                {/if}
                                <div class="form-group">
                                     <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">虚拟人气</label>
                                    <div class="col-sm-8 col-xs-12">
                                        <div class="input-group">
                                            <input type="text" class="form-control"  placeholder="" name="liulan_xn"  value="{$shangjia['liulan_xn']}">
                                            <span class="input-group-addon">次</span>
                                        </div>
                                    </div>
                                </div>

                        </div>
                  </div>
                  {/if}
                  <div class="panel panel-default">
                    <div class="panel-heading">操作密码</div>
                    <div class="panel-body">
                            <div class="form-group">
                                 <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">添加管理员密码</label>
                                <div class="col-sm-8 col-xs-12">
                                    <input type="text" class="form-control"  placeholder="" name="shoppass"  value="{$shangjia['shoppass']}">
                                    <span class="help-block">扫码添加管理员(商家老板,店长),需要输入 管理员可查本商家业绩</span>
                                </div>
                            </div>
                            <div class="form-group">
                                 <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">添加员工密码</label>
                                <div class="col-sm-8 col-xs-12">
                                    <input type="text" class="form-control"  placeholder="" name="workerpass"  value="{$shangjia['workerpass']}">
                                    <span class="help-block">扫码添加员工,需要输入</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">是否可用</label>
                                <div class="col-sm-8 col-xs-12" style="padding-left: 34px;">
                                <label class="checkbox">
                                  <input type="checkbox" name="state" value="1" {if $shangjia['state'] == 1}checked="checked"{/if}>勾选则表示可用(暂停所有权限将停用)
                                </label>
                                 </div>
                            </div>
                            <div class="form-group" >
                                <div class="col-sm-12" style="text-align: center">
                                    <span class="help-block col-lg-4"></span>
                                    <input name="submit" id="btn_submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
                                    <span class="help-block col-lg-3"> 可按 ctrl+s 快速提交</span>
                                    <input type="hidden" name="__token__" value="{$Request.token}" />
                                    <input type="hidden" name="themeid" value="{$themeid}" />
                                </div>
                            </div>
                     </div>
                  </div>
              <!-- {if !empty($shangjia['id'])}
                <div class="panel panel-default">
                    <div class="panel-heading">微信绑定</div>
                    <div class="panel-body">
                            {if empty($shangjia['fansid'])}
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">扫码自动绑定微信</label>
                                <div class="col-sm-8 col-xs-12">
                                    <img style="width: 160px;" src="{php echo createWebUrl('qr',array('url'=>$ewmurl));}">
                                    <span class="help-block">扫码自动绑定微信</span>
                                </div>
                            </div>
                            {else}
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">微信昵称</label>
                                <div class="col-sm-8 col-xs-12">
                                   <input type="text" class="form-control"  placeholder="" name="nickname"  value="{$shangjia['nickname']}">

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">扫码重新绑定微信</label>
                                <div class="col-sm-8 col-xs-12">
                                    <img style="width: 160px;" src="{php echo createWebUrl('qr',array('url'=>$ewmurl));}">                      <img style="width: 135px;" src="{$shangjia['headimgurl']}">

                                    <span class="help-block">扫码重新绑定微信</span>
                                </div>
                            </div>
                            {/if}
                    </div>
              </div>
              {/if} -->
            <!--     <div class="panel panel-default">
                    <div class="panel-heading">权限分配</div>
                    <div class="panel-body">
                            <div class="form-group">
                                <div class="col-sm-8 col-xs-2">
                                  <label class="radio-inline">
                                    <input type="checkbox" name="quanxian[]" id="inlineRadio1" value="1" {if in_array(1,$quanxian)}checked="checked"{/if}> 权限1
                                  </label>
                                  <label class="radio-inline">
                                    <input type="checkbox" name="quanxian[]" id="inlineRadio2" value="2" {if in_array(2,$quanxian)}checked="checked"{/if}> 权限2
                                  </label>
                                  <label class="radio-inline">
                                    <input type="checkbox" name="quanxian[]" id="inlineRadio3" value="3" {if in_array(3,$quanxian)}checked="checked"{/if}> 权限3
                                  </label>
                                  <label class="radio-inline">
                                    <input type="checkbox" name="quanxian[]" id="inlineRadio4" value="4" {if in_array(4,$quanxian)}checked="checked"{/if}> 权限4
                                  </label>
                                  <label class="radio-inline">
                                    <input type="checkbox" name="quanxian[]" id="inlineRadio05" value="5" {if in_array(5,$quanxian)}checked="checked"{/if}> 权限5
                                  </label>
                                </div>
                            </div>
                    </div>
              </div> -->
               </div>
        </div>
    </div>
</form>

<script language='javascript'>

    let is_forbid_edit = "{$is_forbid_edit}";
    if (is_forbid_edit){
        $( "input[name='imgs']").attr("readonly","readonly");
        $( "input[name='address[]']").attr("readonly","readonly");
        $( "input[name='mappoint[]']").attr("readonly","readonly");
        $( ".add-school").hide();
        $("input[name='state']").attr("disabled","disabled");
    }
    $(window).bind('keydown', function(event) {
        if (event.ctrlKey || event.metaKey) {
            switch (String.fromCharCode(event.which).toLowerCase()) {
                case 's':
                    event.preventDefault();
                    $("#btn_submit").click();
                    break;
            }
        }
    });
    function addSchoolAddress() {
        if(($(".school-item input.wraning").length>0))return;
        // if($(".school-item").length>=4){
        //     alert("最多四个地址");
        //     return;
        // }
        var index=$(".school-item").length;
        var  temp_html = `<div style="display: flex;flex-direction:row; " class="school-item">
                            <input  type="text" class="form-control add_input" style="width: 40%"  placeholder="请输入地址名称" name="address[]" maxlength="30" value="">
                            <span class="input-group-addon" style="width: 80px;height: 34px;line-height: 20px">定位</span>
                            <input type="text" class="form-control add_input" style="width: 24%"  placeholder="粘贴定位" name="mappoint[]" maxlength="30" value="">
                            <span class="input-group-addon" style="width: 80px;height: 34px;line-height: 20px">电话</span>
                            <input type="text" class="form-control add_input" style="width: 20%"  placeholder="输入电话" name="new_mobile[]" maxlength="12" value="">
                            <a onclick="deleteSchoolAddress(this)" class="mini_btn" style="height: 34px;width: 50px;text-align: center;line-height: 26px">删除</a>
                        </div>`;
        $(".school-span").before(temp_html);
    }
    function deleteSchoolAddress(obj){
        //获取下标值：$(".school-item").index($(obj).parent(".school-item"));
        console.log($(".school-item").index($(obj).parent(".school-item")));
        if($(".school-item").length<=1){
            return;
        }
        $(obj).parent(".school-item").remove();
    }
    function checkRepeat(obj){
        let newItem=$(obj).val();
        if(!newItem)return;
        let index=$(".school-item").index($(obj).parent(".school-item"));
        for(let i=0;i<$(".school-item").length;i++){
            if(index==i){
                continue;
            }
            if($(".school-item input").eq(i).val()==newItem){
                $(".school-item input").removeClass("wraning");
                $(".school-item input").attr("readonly",true);
                $(".school-item input").eq(i).addClass("wraning").removeAttr("readonly");
                $(obj).addClass("wraning").removeAttr("readonly");
                return;
            }
        }
        if($(obj).hasClass("wraning")){
            $(".school-item input").removeAttr("readonly").removeClass("wraning");
        }
        
    }
</script>

